FLAGS= -O3 -g -lpng -lm

jthread.x : jthread.o wtime.o print_png.o
	gcc $(FLAGS) -pthread jthread.o wtime.o print_png.o -o jthread.x

jthread.o : jthread.c
	gcc -c $(FLAGS) -pthread -o jthread.o jthread.c

wtime.o : wtime.c
	gcc -O3 -c wtime.c

print_png.o : print_png.c
	gcc $(FLAGS) -c print_png.c

clean:
	rm wtime.o print_png.o jthread.x jthread.o
